function delIndexBannerDialog(
    {
        bannerId,
        title,
        callback = Function()
    }
) {
    if (!bannerId) {
        return $.toast("bannerId不能为空");
    }

    const $dialogDom = $.dialog(
        title ? "是否确定删除广告(" + title + ")" : "是否确定删除该广告",
        {
            ok() {
                delIndexBanner({
                    bannerId
                }, res => {
                    if (res.Code !== 10000) {
                        return $.toast(res.Message);
                    }

                    $dialogDom.remove();
                    $.toast("删除成功");
                    callback();
                })
            }
        }
    )

    function delIndexBanner(param, callback = Function()) {
        return $.sApi({
            data: param,
            url: "/api/IndexBanner/delIndexBanner",
        }, callback)
    }
}